#include<iostream>
#include<string>
#include<vector>
using namespace std;
//initializer_list 可以实现结构任意多个相同类型的参数
void func1(initializer_list<int> ls)
{
    auto it = ls.begin();
    for (; it != ls.end(); ++it)
    {
        cout << *it << " ";
    }
    cout << endl;
}
class Test
{
    public:
    Test(initializer_list<string>list)
    {
        for (auto it = list.begin(); it != list.end();it++)
        {
            cout << *it << " ";
            m_name.push_back(*it);
        }
        cout << endl;
    }
    private:
        vector<string> m_name;
};
int main()
{
    func1({1,2,3,4,5,6,76,7,8,8,9,0,8,67,56,54,4,3,32});//将人一多个参数放到一个初始化列表里面，堪称一个对象
    return 0;
}